package ModelLayer;

public class Employee extends Person {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private static int lastId = 0;
	String password;
	String position;

	public Employee(String name, String address, long phone, String password, String position) {
		super(name, address, phone);
		setId(generateId());
		this.password = password;
		this.position = position;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getPosition() {
		return position;
	}

	public void setPosition(String position) {
		this.position = position;
	}
	
	public int generateId()
	{
		return ++lastId;
	}
	
	public static int getLastId()
	{
		return lastId;
	}
	
	public static void setLastId(int lastid)
	{
		lastId = lastid;
	}
	
	public String toString()
	{
		return super.toString() + " Password: " + getPassword() + " Position: " + getPosition();
	}
	
	
}
